<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<%@ include file="/page/common/common_header.jsp" %>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>日志查询</title>

<script src='${baseURL }/js/jquery.min.js'></script>
<script src='${baseURL }/js/common/addTab.js'></script>

<script type="text/javascript" src="http://10.0.250.52/uidev/package/js/itcui.dev.js"></script>
<link rel="stylesheet" type="text/css" href="http://10.0.250.52/uidev/package/css/itcui.dev.css" media="all"/>

<script type="text/javascript" src="${baseURL }/js/itcui.js"></script>
<script type="text/javascript" src="${baseURL }/js/public.js"></script>
<script type="text/javascript" src="${baseURL }/js/jquery.ui.datepicker-zh-CN.js"></script>
<script type="text/javascript" src="${baseURL }/js/jquery-ui-1.10.3.custom.min.js"></script>

<!-- toolbar css  -->
<link rel="stylesheet" type="text/css" href="${baseURL }/css/content_table.css" media="all"/>
<link rel="stylesheet" type="text/css" href="${baseURL }/css/itcui.css" media="all"/>
<link rel="stylesheet" type="text/css" href="${baseURL }/css/base.css" media="all"/>
<link rel="stylesheet" type="text/css" href="${baseURL }/css/smoothness/jquery-ui-1.10.3.custom.min.css" media="all"/>

<style type="text/css">
.gray_hover
{
	box-shadow:0 1px 3px rgba(0,0,0,.2);
	border-color:#787878;
	background:url("") repeat-x;
}
</style>

<script>

var combo1 = [{"name":"选项1"},{"name":"选项2"},{"name":"选项3"},{"name":"选项4"}];
var validator;
var input1;
var input3;

//填充列表数据
function newrow( i )
{
	var html = "<tr>"
		/* +"<td><span class='itcui_chkbox'></span></td>" */
		+"<td>"+(i+1)+"</td>"
		+"<td><div id='td"+i+"_1' style='width:120px'></div></td>"
		+"<td><div id='td"+i+"_3' style='width: 80px'></td>"
		+"<td><div id='td"+i+"_4' style='width: 60px'></td>"
		+"<td><div id='td"+i+"_5' style='width: 60px'></td>"
		+"<td><div id='td"+i+"_6' style='width: 80px'></td>"
		+"<td><div id='td"+i+"_7' style='width: 80px'></td>"
		+"<td><div id='td"+i+"_8' style='width: 140px'></td>"
		+"<td><div id='td"+i+"_9' style='width: 110px'></td>"
		+"</tr>";
		
	$(".itcui_table").append(html);
	$('#td' + i +'_1').html( "CHHV140510092" + i );
	$('#td' + i +'_3').html( "2014-05-" + ( i + 1 ) );
	$('#td' + i +'_4').html( " 常白班" );
	$('#td' + i +'_5').html( (i % 2 + 1) + "值" );
	$('#td' + i +'_6').html( "工人" + (i % 3 + 1) );
	$('#td' + i +'_7').html( "工人" + (i % 3 + 2) );
	$('#td' + i +'_8').html( "2014-05-05 16:28:17" );
	$('#td' + i +'_9').html( "交接成功");
}



$(document).ready(function(){
	//addTab("test","test","last");
	
	input1 = new $.ITCUI_Input("#username");
	var input2 = new $.ITCUI_Input("#birthday");
	input1.turnDatePicker();
	input2.turnDatePicker();
	input3 = new $.ITCUI_Input("#mail");
	var input7 = new $.ITCUI_Input("#usedname");
	var input8 = new $.ITCUI_Input("#status");
	var radio1 = new $.ITCUI_Radio("#gender_male","gender",true);
	var radio2 = new $.ITCUI_Radio("#gender_female","gender",false);
	var foldable1 = new $.ITCUI_Foldable("#base_info");
	validator = new $.ITCUI_Validator();
	var test1 = new $.ITCUI_Input("#test1");
	var test2 = new $.ITCUI_Input("#test2");
	var test3 = new $.ITCUI_Input("#test3");
	var test4 = new $.ITCUI_Input("#test4");
	var test5 = new $.ITCUI_Input("#test5");	
	
	for( var j = 0; j < 15; j ++ ){
		newrow( j );
	}
	
	 
	 $("tr").dblclick(function(){
		 var url = "${baseURL}/page/operationlog/logDetail.jsp";
		 var date=new Date().getTime();
			addTab( "logDetail"+date, "日志详情", url );		 
	 });
	 
	 $("#zhizhang").addClass("gray_hover");
		
		$("#zhizhang").click(function(){
			changeDetail('交接成功');
			$("#zhizhang").addClass("gray_hover");
			$("#zhiyuan").removeClass("gray_hover");
		});
		$("#zhiyuan").click(function(){
			changeDetail('未交接');
			$("#zhizhang").removeClass("gray_hover");
			$("#zhiyuan").addClass("gray_hover");
		});
});

//改变值长 值班员函数
function changeDetail( text ){
	if( text == "交接成功"){
		for( var j = 0; j < 15; j ++ ){
			$('#td' + j +'_9').html("交接成功");
		}
	}else{
		for( var j = 0; j < 15; j ++ ){
			$('#td' + j +'_9').html("未交接");
		}
	}
}

function advSearch(){
	$("#form_main").toggle();
}
</script>

</head>
<body class="ml12 mr12 mt12">
	<!-- <div id="leftTree">
		<ul id="treeDiv"></ul>
	</div> -->
	<div id="content">
		<div class="toolbar">
		<span class="itcui_btn_base itcui_btn_gray itcui_btn_grp_l" style="width:110px;margin-left:-1px"  id="zhizhang" >值长日志</span>
		<span class="itcui_btn_base itcui_btn_gray itcui_btn_grp_r" style="width:110px;margin-left:-1px" onclick="changeDetail('值班员日志')" id="zhiyuan" >值班员日志</span>
		<a href="#" style="margin-left:8px;margin-top:6px" class="itcui_link fl" onclick="advSearch();">高级搜索</a>
		<div class="itcui_btn_circle" style="float:right" onclick="msgHelp();"><span class="itcui_btn_circle_help itcui_btn_circle_icon"></span></div>
		<div id="btn_setting" class="itcui_btn_circle fr" style="margin-right:2px"><span class="itcui_btn_circle_setting itcui_btn_circle_icon"></span></div>
		<div class="itcui_btn_circle fr" style="margin-right:2px"><span class="itcui_btn_circle_next itcui_btn_circle_icon"></span></div>
		<div class="itcui_btn_circle_disable fr" style="margin-right:2px"><span class="itcui_btn_circle_prev_disable itcui_btn_circle_icon_disable"></span></div>
		
		<div class="itcui_pager fr" id="pager"><span style="line-height:22px">1/5</span><img src="${baseURL }/images/pager_arrow.png"/></div>
	</div>
		
		
		<div id="form_main" style="display: none;">
		<div id="base_info_subitem" style="width:100%;min-height:100px;">
			<div class="itcui_frm_row_auto mt4">
				<div class="itcui_frm_col" style="">
					<span class="itcui_frm_field_name" style="float:left">起始日期：</span>
					<div id="username" style="float:left;width:160px;"></div>
					<!-- <span  style="float: left;width: 10px;font-size: 12px;margin-right: 8px;">至</span>
					<div id="birthday" style="float:left;width:80px;"></div> -->
				</div>
				<div class="itcui_frm_col fl">
					<span class="itcui_frm_field_name" style="float:left">终止日期：</span>
					<div id="birthday" style="float:left;width:160px;"></div>
				</div> 
				<div class="itcui_frm_col fl">
					<span class="itcui_frm_field_name" style="float:left">类型：</span>
					<div id="usedname" style="float:left;width:160px;"></div>
				</div>
				<div class="itcui_frm_col fl">
					<span class="itcui_frm_field_name" style="float:left">状态：</span>
					<div id="status" style="float:left;width:160px;"></div>
				</div>
			</div>
			<div class="itcui_frm_row_auto">
				<div class="itcui_frm_col">
					<span class="itcui_frm_field_name" style="float:left">班次：</span>
					<div id="test1" style="float:left;width:160px;"></div>
				</div>
				<div class="itcui_frm_col">
					<span class="itcui_frm_field_name" style="float:left">值别：</span>
					<div id="test2" style="float:left;width:160px;"></div>
				</div>
				<div class="itcui_frm_col">
					<span class="itcui_frm_field_name" style="float:left">值班人：</span>
					<div id="test3" style="float:left;width:160px;"></div>
				</div>
				<div class="itcui_frm_col">
					<span class="itcui_frm_field_name" style="float:left">记事内容：</span>
					<div id="test4" style="float:left;width:160px;"></div>
				</div>
				<div class="itcui_frm_col">
					<span class="itcui_btn_base itcui_btn_gray" style="width:60px;float:left;margin-left: 60px;" onclick="showFormErr();">查询</span>
					<!-- <span class="itcui_btn_base itcui_btn_gray" style="width:120px;float:left;margin-left: 8px;">月度记事查询</span> -->
				</div>
			</div>
	</div>
	</div>
	
	<table class="itcui_table" style="clear:both" width="100%" cellspacing="0">
		<tr style="height:24px">
			<!-- <th width="26"><span class="itcui_chkbox"></span></th> -->
			<th width="26">序号</th>
			<th width="120">日志编号</th>
			<th width="80" class="th_sortable">值班时间</th>
			<th width="60" class="th_sortable">班次</th>
			<th width="60" class="th_sortable">值别</th>
			<th width="80" class="th_sortable">值班人</th>
			<th width="80" class="th_sortable">接班人</th>
			<th width="140" class="th_sortable">交接班时间</th>
			<th width="110" class="th_sortable">状态</th>
		</tr>
			
	</table>
	</div>
</body>
</html>